package homework5.exp1;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author fengq
 */
public class LoginServer extends Thread{
    ServerSocket serverSocket;

    @Override
    public void run() {
        try {
            serverSocket = new ServerSocket(8800);
            Socket socket=null;
            while(true){
                socket=serverSocket.accept();
                LoginThread loginThread=new LoginThread(socket);
                loginThread.start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        LoginServer loginServer = new LoginServer();
        loginServer.start();
    }
}
